<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/html">
<head>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css" rel="stylesheet"
          integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.4.0/font/bootstrap-icons.css">
    <meta charset="UTF-8">
    <title>系统初始化</title>
</head>
<body>
<header class="px-3 py-2 bg-dark text-white">
    <div class="container">
        <div class="d-flex flex-wrap align-items-center justify-content-center justify-content-lg-start">
            <a href="index.html"
               class="d-flex align-items-center my-2 my-lg-0 me-lg-auto text-white text-decoration-none">
                <img src="img/icon.png" alt="icon" width="220" height="50">
            </a>
            <ul class="nav col-12 col-lg-auto my-2 justify-content-center my-md-0 text-small">
                <li>
                    <a href="init.html" class="nav-link text-white">
                        <i class="bi bi-diagram-2"></i>
                        <b>初始化</b>
                    </a>
                </li>
                <li>
                    <a href="/allUsers.html" class="nav-link text-white">
                        <i class="bi bi-people"></i>
                        <b>查看所有账户</b>
                    </a>
                </li>
                <li>
                    <a href="transaction.html" class="nav-link text-white">
                        <i class="bi bi-cart-check"></i>
                        <b>发起交易</b>
                    </a>
                </li>
                <li>
                    <a href="audit.html" class="nav-link text-white">
                        <i class="bi bi-ui-checks-grid"></i>
                        <b>审计交易链</b>
                    </a>
                </li>
            </ul>
        </div>
    </div>
</header>

<div class="container" style="background-color: #98fb98; border-radius: 6px; margin-top: 10px">
    <div class="py-4 text-center">
        <h2>初始化系统</h2>
        <p class="lead">该功能将初始化LatteChain系统，这包括初始化数据库信息，初始化用户信息，并创建初始区块并加入区块链</p>
    </div>
</div>
<div class="text-center">
    <h2 style="margin-top: 10px"><i class="bi bi-emoji-laughing"></i>点击下方按钮进行初始化: </h2>
    <form action="/init" method="get">
        <button class="btn btn-primary" type="submit" style="margin-top: 10px" onclick="init()">点此初始化</button>
    </form>
    <div id="init-msg" style="color: red"></div>
</div>
<script>
    function init() {
        document.getElementById("init-msg").innerHTML = "初始化成功！";
    }
</script>
</body>
</html>
